/* 公共 js 方法存放 */
// 职责：负责管理当前系统中所有公共的配置
export function api() {
    return 'https://api.apiopen.top' //所有数据api的域名地址
}
/* 滚动隐藏顶部栏 */
export function scrollHidden(e) {
    let hideBox = document.getElementById('tmpl');
    if (e.target.scrollTop > 300) {
        hideBox.className = 'hideEle'
    } else if (e.target.scrollTop < 300) {
        hideBox.classList.remove('hideEle')
    }
}

/* 




        <!-- 实现新闻资讯列表样式 -->
        <div class="news">
            <div class="newslist" @scroll="scrollHideTit(e)">
                <h3 class="list_title">新闻</h3>
                <ul class="mui-table-view">
                    <li
                        class="mui-table-view-cell mui-media"
                        v-for="(item, index) in tech_list"
                        :key="index"
                    >
                        <!-- to 的第一种写法 -->
                        <router-link v-bind="{to:'/home/newsinfo/'+ item.docid}" class="news-list-link">
                            <img
                                class="mui-media-object mui-pull-left"
                                :src="item.picInfo[0] ? item.picInfo[0].url : ''"
                            />
                            <!-- 初始时list为空所以需要判断一下在渲染src -->
                            <div class="mui-media-body" :title="item.title">
                                <p class="news-title">{{item.title}}</p>
                                <p class="mui-ellipsis" :title="item.digest">{{item.digest}}</p>
                                <div class="ft">
                                    <span>发表时间：{{item.ptime | datefmt('YYYY-MM-DD → HH:mm:ss')}}</span>
                                    <br />
                                    <span class="click">点击数：{{item.tcount}}</span>
                                </div>
                            </div>
                        </router-link>
                    </li>
                </ul>
            </div>
            <!-- 实现汽车资讯列表样式 -->
            <div class="newslist">
                <h3 class="list_title">汽车</h3>
                <ul class="mui-table-view">
                    <li
                        class="mui-table-view-cell mui-media"
                        v-for="(item, index) in auto_list"
                        :key="index"
                    >
                        <!-- to 的第二种写法 -->
                        <router-link :to="'/home/newsinfo/' + item.docid" class="news-list-link">
                            <img
                                class="mui-media-object mui-pull-left"
                                :src="item.picInfo[0] ? item.picInfo[0].url : ''"
                            />
                            <!-- 初始时list为空所以需要判断一下在渲染src -->
                            <div class="mui-media-body" :title="item.title">
                                <p class="news-title">{{item.title}}</p>
                                <p class="mui-ellipsis" :title="item.digest">{{item.digest}}</p>
                                <div class="ft">
                                    <span>发表时间：{{item.ptime | datefmt('YYYY-MM-DD → HH:mm:ss')}}</span>
                                    <br />
                                    <span class="click">点击数：{{item.tcount}}</span>
                                </div>
                            </div>
                        </router-link>
                    </li>
                </ul>
            </div>
            <!-- 实现财经资讯列表样式 -->
            <div class="newslist">
                <h3 class="list_title">财经</h3>
                <ul class="mui-table-view">
                    <li
                        class="mui-table-view-cell mui-media"
                        v-for="(item, index) in money_list"
                        :key="index"
                    >
                        <router-link v-bind="{to:'/home/newsinfo/' + item.docid}" class="news-list-link">
                            <img
                                class="mui-media-object mui-pull-left"
                                :src="item.picInfo[0] ? item.picInfo[0].url : ''"
                            />
                            <!-- 初始时list为空所以需要判断一下在渲染src -->
                            <div class="mui-media-body" :title="item.title">
                                <p class="news-title">{{item.title}}</p>
                                <p class="mui-ellipsis" :title="item.digest">{{item.digest}}</p>
                                <div class="ft">
                                    <span>发表时间：{{item.ptime | datefmt('YYYY-MM-DD → HH:mm:ss')}}</span>
                                    <br />
                                    <span class="click">点击数：{{item.tcount}}</span>
                                </div>
                            </div>
                        </router-link>
                    </li>
                </ul>
            </div>
            <!-- 实现运动资讯列表样式 -->
            <div class="newslist">
                <h3 class="list_title">运动</h3>
                <ul class="mui-table-view">
                    <li
                        class="mui-table-view-cell mui-media"
                        v-for="(item, index) in sports_list"
                        :key="index"
                    >
                        <router-link v-bind="{to:'/home/newsinfo/' + item.docid}" class="news-list-link">
                            <img
                                class="mui-media-object mui-pull-left"
                                :src="item.picInfo[0] ? item.picInfo[0].url : ''"
                            />
                            <!-- 初始时list为空所以需要判断一下在渲染src -->
                            <div class="mui-media-body" :title="item.title">
                                <p class="news-title">{{item.title}}</p>
                                <p class="mui-ellipsis" :title="item.digest">{{item.digest}}</p>
                                <div class="ft">
                                    <span>发表时间：{{item.ptime | datefmt('YYYY-MM-DD → HH:mm:ss')}}</span>
                                    <br />
                                    <span class="click">点击数：{{item.tcount}}</span>
                                </div>
                            </div>
                        </router-link>
                    </li>
                </ul>
            </div>
            <!-- 实现娱乐资讯列表样式 -->
            <div class="newslist">
                <h3 class="list_title">娱乐</h3>
                <ul class="mui-table-view">
                    <li
                        class="mui-table-view-cell mui-media"
                        v-for="(item, index) in ent_list"
                        :key="index"
                    >
                        <router-link v-bind="{to:'/home/newsinfo/' + item.docid}" class="news-list-link">
                            <img
                                class="mui-media-object mui-pull-left"
                                :src="item.picInfo[0] ? item.picInfo[0].url : ''"
                            />
                            <!-- 初始时list为空所以需要判断一下在渲染src -->
                            <div class="mui-media-body" :title="item.title">
                                <p class="news-title">{{item.title}}</p>
                                <p class="mui-ellipsis" :title="item.digest">{{item.digest}}</p>
                                <div class="ft">
                                    <span>发表时间：{{item.ptime | datefmt('YYYY-MM-DD → HH:mm:ss')}}</span>
                                    <br />
                                    <span class="click">点击数：{{item.tcount}}</span>
                                </div>
                            </div>
                        </router-link>
                    </li>
                </ul>
            </div>
            <!-- 实现战争资讯列表样式 -->
            <div class="newslist">
                <h3 class="list_title">军事</h3>
                <ul class="mui-table-view">
                    <li
                        class="mui-table-view-cell mui-media"
                        v-for="(item, index) in war_list"
                        :key="index"
                    >
                        <router-link v-bind="{to:'/home/newsinfo/' + item.docid}" class="news-list-link">
                            <img
                                class="mui-media-object mui-pull-left"
                                :src="item.picInfo[0] ? item.picInfo[0].url : ''"
                            />
                            <!-- 初始时list为空所以需要判断一下在渲染src -->
                            <div class="mui-media-body" :title="item.title">
                                <p class="news-title">{{item.title}}</p>
                                <p class="mui-ellipsis" :title="item.digest">{{item.digest}}</p>
                                <div class="ft">
                                    <span>发表时间：{{item.ptime | datefmt('YYYY-MM-DD → HH:mm:ss')}}</span>
                                    <br />
                                    <span class="click">点击数：{{item.tcount}}</span>
                                </div>
                            </div>
                        </router-link>
                    </li>
                </ul>
            </div>
            <!-- 实现头条资讯列表样式 -->
            <div class="newslist">
                <h3 class="list_title">头条</h3>
                <ul class="mui-table-view">
                    <li
                        class="mui-table-view-cell mui-media"
                        v-for="(item, index) in toutiao_list"
                        :key="index"
                    >
                        <router-link v-bind="{to:'/home/newsinfo/' + item.docid}" class="news-list-link">
                            <img
                                class="mui-media-object mui-pull-left"
                                :src="item.picInfo[0] ? item.picInfo[0].url : ''"
                            />
                            <!-- 初始时list为空所以需要判断一下在渲染src -->
                            <div class="mui-media-body" :title="item.title">
                                <p class="news-title">{{item.title}}</p>
                                <p class="mui-ellipsis" :title="item.digest">{{item.digest}}</p>
                                <div class="ft">
                                    <span>发表时间：{{item.ptime | datefmt('YYYY-MM-DD → HH:mm:ss')}}</span>
                                    <br />
                                    <span class="click">点击数：{{item.tcount}}</span>
                                </div>
                            </div>
                        </router-link>
                    </li>
                </ul>
            </div>
            <!-- 实现推荐资讯列表样式 -->
            <div class="newslist">
                <h3 class="list_title">推荐</h3>
                <ul class="mui-table-view">
                    <li
                        class="mui-table-view-cell mui-media"
                        v-for="(item, index) in dy_list"
                        :key="index"
                    >
                        <router-link v-bind="{to:'/home/newsinfo/' + item.docid}" class="news-list-link">
                            <img
                                class="mui-media-object mui-pull-left"
                                :src="item.picInfo[0] ? item.picInfo[0].url : ''"
                            />
                            <!-- 初始时list为空所以需要判断一下在渲染src -->
                            <div class="mui-media-body" :title="item.title">
                                <p class="news-title">{{item.title}}</p>
                                <p class="mui-ellipsis" :title="item.digest">{{item.digest}}</p>
                                <div class="ft">
                                    <span>发表时间：{{item.ptime | datefmt('YYYY-MM-DD → HH:mm:ss')}}</span>
                                    <br />
                                    <span class="click">点击数：{{item.tcount}}</span>
                                </div>
                            </div>
                        </router-link>
                    </li>
                </ul>
            </div>
        </div>



*/